package cn.com.jinhao.hotline.commons.vo.system;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;

@Data
public class  SysDictRequestVO {
    public interface Create {}

    public interface Update{}
    /**
     * id
     */
    @ApiModelProperty(value = "id")
    @NotBlank(message = "code编码不能为空")
    private String id;
    /**
     * 编码
     */
    @ApiModelProperty(value = "编码")
    @NotBlank(message = "code编码不能为空")
    private String code;
    /**
     * 父编码
     */
    @ApiModelProperty(value = "父编码")
    private String paid;
    /**
     * 名称
     */
    @ApiModelProperty(value = "名称")
    @NotEmpty(message = "name名称不能为空", groups = {SysDictRequestVO.Create.class})
    private String name;
    /**
     * 数值
     */
    @ApiModelProperty(value = "数值")
    private String sysValue;

    /**
     * 值类型
     */
    @ApiModelProperty(value = "值类型")
    private String sysType;
    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String memo;
    /**
     * 部门编码
     */
    @ApiModelProperty(value = "部门编码")
    private String deptCode;
    /**
     * 创建人ID
     */
    @ApiModelProperty(value = "创建人ID")
    @NotBlank(message = "createdById创建人ID不能为空", groups = {SysDictRequestVO.Create.class})
    private String createdById;
    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    @NotBlank(message = "createdBy创建人不能为空", groups = {SysDictRequestVO.Create.class})
    private String createdBy;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @NotBlank(message = "createdTime创建时间不能为空", groups = {SysDictRequestVO.Create.class})
    @Pattern(regexp = "^((([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})-(((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)-(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-8]))))|((([0-9]{2})(0[48]|[2468][048]|[13579][26])|((0[48]|[2468][048]|[3579][26])00))-02-29))\\\\s+([0-1]?[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$", message = "修改时间日期格式不正确")
    private String createdTime;

    /**
     * 修改人#ID
     */
    @ApiModelProperty(value = "修改人#ID")
    @NotBlank(message = "updatedById修改人#ID不能为空", groups = {SysDictRequestVO.Update.class})
    @Pattern(regexp = "^[0-9]*$", message = "修改人#ID必须为数字")
    private String updatedById;

    /**
     * 修改人
     */
    @ApiModelProperty(value = "修改人")
    @NotBlank(message = "updatedBy修改人不能为空", groups = {SysDictRequestVO.Update.class})
    private String updatedBy;

    /**
     * 修改时间
     */
    @ApiModelProperty(value = "修改时间")
    @NotBlank(message = "updatedTime缺少修改时间", groups = {SysDictRequestVO.Update.class})
    @Pattern(regexp = "^((([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})-(((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)-(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-8]))))|((([0-9]{2})(0[48]|[2468][048]|[13579][26])|((0[48]|[2468][048]|[3579][26])00))-02-29))\\\\s+([0-1]?[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$", message = "修改时间日期格式不正确")
    private String updatedTime;
}
